package com.knife.rockknife4jdemo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import lombok.Data;

@Data
@ApiModel(value = "最后一次预录数据")
public class LastPrerecordDTO {
    /**
     * 直航
     */
    public static final Integer DIRECT = 0;

    @ApiModelProperty(value = "ID")
    private Long id;

    @ApiModelProperty(value = "任务ID")
    private Long taskId;

    @ApiModelProperty(value = "港口")
    private String portCode;

    @ApiModelProperty(value = "码头【港区CODE】")
    private String portDistrictCode;

    @ApiModelProperty(value = "码头名称【港区名称】")
    private String portDistrictName;

    @ApiModelProperty(value = "箱号")
    private String ctnNumber;

    @ApiModelProperty(value = "铅封号")
    private String sealNumber;

    @ApiModelProperty(value = "箱型尺寸")
    private String ctnSizeType;

    @ApiModelProperty(value = "船名")
    private String vessel;

    @ApiModelProperty(value = "航次")
    private String voyage;

    @ApiModelProperty(value = "船舶编码")
    private String vesselUncode;

    @ApiModelProperty(value = "空重箱标记")
    private String ctnStatus;

    @ApiModelProperty(value = "箱营运人code")
    private String ctnOperatorCode;

    @ApiModelProperty(value = "箱营运人")
    private String ctnOperator;

    @ApiModelProperty(value = "序列号")
    private String barCode;

    @ApiModelProperty(value = "订舱货代")
    private String forwardName;

    @ApiModelProperty(value = "订舱货代")
    private String forwardCode;

    @ApiModelProperty(value = "装货港")
    private String loadingPort;

    @ApiModelProperty(value = "卸货港")
    private String dischargingPort;

    @ApiModelProperty(value = "目的港")
    private String destinationPort;

    @ApiModelProperty(value = "船公司code")
    private String carrierCode;

    @ApiModelProperty(value = "船公司名称")
    private String carrierName;

    @ApiModelProperty(value = "皮重")
    private BigDecimal tareWeight;

    @ApiModelProperty(value = "付费代理(太仓)")
    private String paymentAgent;

    @ApiModelProperty(value = "支线船名(驳船)")
    private String branchVessel;

    @ApiModelProperty(value = "支线航次(驳船)")
    private String branchVoyage;

    @ApiModelProperty(value = "支线港区(太仓)")
    private String branchPortDistrict;

    @ApiModelProperty(value = "做箱日期(上港)")
    private Date packingTime;

    @ApiModelProperty(value = "做箱地址(上港)")
    private String packingAddress;

    @ApiModelProperty(value = "箱货信息json")
    private String billInfo;

    @ApiModelProperty(value = "总重量")
    private BigDecimal totalOfCargo;

    @ApiModelProperty(value = "总体积")
    private BigDecimal totalVolume;

    @ApiModelProperty(value = "总件数")
    private BigDecimal totalPackageQty;

    @ApiModelProperty(value = "总重量")
    private BigDecimal totalWeight;

    @ApiModelProperty(value = "总重量")
    private String prerecordReceiptUrl;

    @ApiModelProperty(value = "发送时间")
    private Date prerecordSendTime;

    @ApiModelProperty(value = "预录接收方")
    private String prerecordReceiver;

    @ApiModelProperty(value = "预录回执结果")
    private String prerecordReceiptResult;

    @ApiModelProperty(value = "预录回执时间")
    private Date prerecordReceiptTime;

    @ApiModelProperty(value = "创建人")
    private String createdBy;

    @ApiModelProperty(value = "创建时间")
    private Date creationTime;

    @ApiModelProperty(value = "最后更新时间")
    private Date lastUpdateTime;

    @ApiModelProperty(value = "更新人")
    private String updatedBy;

    @ApiModelProperty(value = "内外贸标记 ： 内贸，外贸")
    private String tradeFlag;

    @ApiModelProperty(value = "0:直航,1:驳船,2:沪太通")
    private Integer transportBusinessType;

    @ApiModelProperty(value = "箱ID")
    private String containerId;

    @ApiModelProperty(value = "预录指令【0：按工厂,1按系统,2: 提单按系统,数据按工厂】")
    private Integer gateInType;

    @ApiModelProperty(value = "最后一次预录提单信息集合")
    private List<PrerecordContainerBldataDTO> containerBldataDTOS;

    public Integer getTransportBusinessType() {
        if(null == this.transportBusinessType){
            return DIRECT;
        }
        return transportBusinessType;
    }
}
